//
//  NSDate+BVideoCache.m
//  Bullet
//
//  Created by  on 2019/9/19.
//  Copyright © 2019 . All rights reserved.
//

#import "NSDate+BVideoCache.h"

@implementation NSDate (BVideoCache)

- (BOOL)greaterThan:(NSDate *)date{
    NSTimeInterval selfT = [self timeIntervalSince1970];
    NSTimeInterval otherT = [date timeIntervalSince1970];
    return  (selfT - otherT) >= 0;
}

- (NSString *)dateToString:(NSString*)format{
    
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:format];
    return [formatter stringFromDate:self];
}

@end
